

class Account {
    private double balance;

    public Account(double initialBalance) {
        balance = initialBalance;
    }

    public void deposit(double amount) {
        balance += amount;
    }

    public void withdraw(double amount) throws RuntimeException {
        if (amount > balance) {
            throw new RuntimeException("Not Sufficient Funds");
        }
        balance -= amount;
    }

    public double getBalance() {
        return balance;
    }
}

public class BankingApplication {
    public static void main(String[] args) {
        Account account = new Account(1000);

        try {
            System.out.println("Initial Balance: " + account.getBalance());

            account.withdraw(500);
            System.out.println("After withdrawing 500: " + account.getBalance());

            account.withdraw(400);
            System.out.println("After withdrawing 400: " + account.getBalance());

            account.withdraw(300); // This will trigger an InsufficientFunds
            System.out.println("After withdrawing 300: " + account.getBalance());

        } catch (RuntimeException e) {
            System.out.println("Exception: " + e.getMessage());
        }
    }
}
